/*
  Code Snippet Widget
  ------------------------------------------------------------------------------
*/

.code-snippet {
  margin: $ix-marg-a 0;
  border-radius: $ix-radius;
  overflow: hidden;
}

.code-snippet--scroll {
  min-height: 26px !important;
  background-color: $g4-onyx;
}

.code-snippet--text {
  font-size: 13px;
  line-height: 20px;
  color: $c-potassium;
  font-weight: 600;
  font-family: $code-font;
  padding: $ix-marg-a $ix-marg-c;

  pre {
    display: inline-block;
    white-space: pre-wrap;
  }

  pre,
  code {
    word-wrap: break-word;
    word-break: break-all;
  }
}

.code-snippet--footer {
  background-color: rgba($g4-onyx, 0.5);
  display: flex;
  border-top: $ix-border solid $g5-pepper;
  align-items: center;
  justify-content: space-between;
  padding: $ix-marg-b $ix-marg-c;
}

.code-snippet--label {
  font-size: $ix-text-base;
  color: $g11-sidewalk;
  margin: 0;
}

.copy-button {
  position: absolute;
  right: $ix-marg-b;
  top: calc(50% - 15px);
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.script-snippet--container:hover {
  .copy-button {
    opacity: 1;
  }
}
